package org.teamh.gui.ingame;

import java.util.HashMap;

import org.teamh.gui.engine.model.Model;
import org.teamh.gui.engine.model.ModelLoader;

public class LoadTowers {
	HashMap<String, Model> towerModels= new HashMap<String, Model>();
	HashMap<String, Model> towerTexture= new HashMap<String, Model>();
	private Model object;
	private Model colored;
	private Model Basic;
	private Model Basic_texture;
	private Model Slow;
	private Model Slow_texture;
	private Model Splash;
	private Model Splash_texture;
	private Model Rocket;
	private Model Rocket_texture;
	private Model Speed;
	private Model Speed_texture;
	private Model Ultimate;
	private Model Ultimate_texture;
	
	public LoadTowers(){
		init();
	}
	
	private void init() {
		Basic=ModelLoader.getModel("res/model/tower/basic_tower.obj");
		Basic_texture=ModelLoader.getModel("res/model/tower/basic_tower_colored.obj");;
		Slow=ModelLoader.getModel("res/model/tower/slow_tower.obj");
		Slow_texture=ModelLoader.getModel("res/model/tower/slow_tower_colored.obj");
		Splash=ModelLoader.getModel("res/model/tower/splash_tower.obj");
		Splash_texture=ModelLoader.getModel("res/model/tower/splash_tower_colored.obj");
		Rocket=ModelLoader.getModel("res/model/tower/rocket_tower.obj");
		Rocket_texture=ModelLoader.getModel("res/model/tower/rocket_tower_colored.obj");
		Speed=ModelLoader.getModel("res/model/tower/speed_tower.obj");
		Speed_texture=ModelLoader.getModel("res/model/tower/speed_tower_colored.obj");
		Ultimate=ModelLoader.getModel("res/model/tower/ultimate_tower.obj");
		Ultimate_texture=ModelLoader.getModel("res/model/tower/ultimate_tower_colored.obj");
		towerModels.put("basic", Basic);
		towerModels.put("slow", Slow);
		towerModels.put("splash", Splash);
		towerModels.put("rocket", Rocket);
		towerModels.put("speed", Speed);
		towerModels.put("ultimate", Ultimate);
		towerTexture.put("basic", Basic_texture);
		towerTexture.put("slow", Slow_texture);
		towerTexture.put("splash", Splash_texture);
		towerTexture.put("rocket", Rocket_texture);
		towerTexture.put("speed", Speed_texture);
		towerTexture.put("ultimate", Ultimate_texture);
	}

	public void build(String tower) {
		object=towerModels.get(tower.toLowerCase());
		colored=towerTexture.get(tower.toLowerCase());
	}
	
	
	public Model getObject() {
		return object;
	}

	public Model getColored() {
		return colored;
	}
	

}
